
mycode:     file format elf64-x86-64


Disassembly of section .init:

0000000000001000 <_init>:
    1000:	f3 0f 1e fa          	endbr64 
    1004:	48 83 ec 08          	sub    $0x8,%rsp
    1008:	48 8b 05 d9 2f 00 00 	mov    0x2fd9(%rip),%rax        # 3fe8 <__gmon_start__@Base>
    100f:	48 85 c0             	test   %rax,%rax
    1012:	74 02                	je     1016 <_init+0x16>
    1014:	ff d0                	call   *%rax
    1016:	48 83 c4 08          	add    $0x8,%rsp
    101a:	c3                   	ret    

Disassembly of section .plt:

0000000000001020 <.plt>:
    1020:	ff 35 92 2f 00 00    	push   0x2f92(%rip)        # 3fb8 <_GLOBAL_OFFSET_TABLE_+0x8>
    1026:	f2 ff 25 93 2f 00 00 	bnd jmp *0x2f93(%rip)        # 3fc0 <_GLOBAL_OFFSET_TABLE_+0x10>
    102d:	0f 1f 00             	nopl   (%rax)
    1030:	f3 0f 1e fa          	endbr64 
    1034:	68 00 00 00 00       	push   $0x0
    1039:	f2 e9 e1 ff ff ff    	bnd jmp 1020 <_init+0x20>
    103f:	90                   	nop
    1040:	f3 0f 1e fa          	endbr64 
    1044:	68 01 00 00 00       	push   $0x1
    1049:	f2 e9 d1 ff ff ff    	bnd jmp 1020 <_init+0x20>
    104f:	90                   	nop

Disassembly of section .plt.got:

0000000000001050 <__cxa_finalize@plt>:
    1050:	f3 0f 1e fa          	endbr64 
    1054:	f2 ff 25 9d 2f 00 00 	bnd jmp *0x2f9d(%rip)        # 3ff8 <__cxa_finalize@GLIBC_2.2.5>
    105b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)

Disassembly of section .plt.sec:

0000000000001060 <puts@plt>:
    1060:	f3 0f 1e fa          	endbr64 
    1064:	f2 ff 25 5d 2f 00 00 	bnd jmp *0x2f5d(%rip)        # 3fc8 <puts@GLIBC_2.2.5>
    106b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)

0000000000001070 <printf@plt>:
    1070:	f3 0f 1e fa          	endbr64 
    1074:	f2 ff 25 55 2f 00 00 	bnd jmp *0x2f55(%rip)        # 3fd0 <printf@GLIBC_2.2.5>
    107b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)

Disassembly of section .text:

0000000000001080 <_start>:
    1080:	f3 0f 1e fa          	endbr64 
    1084:	31 ed                	xor    %ebp,%ebp
    1086:	49 89 d1             	mov    %rdx,%r9
    1089:	5e                   	pop    %rsi
    108a:	48 89 e2             	mov    %rsp,%rdx
    108d:	48 83 e4 f0          	and    $0xfffffffffffffff0,%rsp
    1091:	50                   	push   %rax
    1092:	54                   	push   %rsp
    1093:	45 31 c0             	xor    %r8d,%r8d
    1096:	31 c9                	xor    %ecx,%ecx
    1098:	48 8d 3d 05 01 00 00 	lea    0x105(%rip),%rdi        # 11a4 <main>
    109f:	ff 15 33 2f 00 00    	call   *0x2f33(%rip)        # 3fd8 <__libc_start_main@GLIBC_2.34>
    10a5:	f4                   	hlt    
    10a6:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
    10ad:	00 00 00 

00000000000010b0 <deregister_tm_clones>:
    10b0:	48 8d 3d 59 2f 00 00 	lea    0x2f59(%rip),%rdi        # 4010 <__TMC_END__>
    10b7:	48 8d 05 52 2f 00 00 	lea    0x2f52(%rip),%rax        # 4010 <__TMC_END__>
    10be:	48 39 f8             	cmp    %rdi,%rax
    10c1:	74 15                	je     10d8 <deregister_tm_clones+0x28>
    10c3:	48 8b 05 16 2f 00 00 	mov    0x2f16(%rip),%rax        # 3fe0 <_ITM_deregisterTMCloneTable@Base>
    10ca:	48 85 c0             	test   %rax,%rax
    10cd:	74 09                	je     10d8 <deregister_tm_clones+0x28>
    10cf:	ff e0                	jmp    *%rax
    10d1:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
    10d8:	c3                   	ret    
    10d9:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)

00000000000010e0 <register_tm_clones>:
    10e0:	48 8d 3d 29 2f 00 00 	lea    0x2f29(%rip),%rdi        # 4010 <__TMC_END__>
    10e7:	48 8d 35 22 2f 00 00 	lea    0x2f22(%rip),%rsi        # 4010 <__TMC_END__>
    10ee:	48 29 fe             	sub    %rdi,%rsi
    10f1:	48 89 f0             	mov    %rsi,%rax
    10f4:	48 c1 ee 3f          	shr    $0x3f,%rsi
    10f8:	48 c1 f8 03          	sar    $0x3,%rax
    10fc:	48 01 c6             	add    %rax,%rsi
    10ff:	48 d1 fe             	sar    %rsi
    1102:	74 14                	je     1118 <register_tm_clones+0x38>
    1104:	48 8b 05 e5 2e 00 00 	mov    0x2ee5(%rip),%rax        # 3ff0 <_ITM_registerTMCloneTable@Base>
    110b:	48 85 c0             	test   %rax,%rax
    110e:	74 08                	je     1118 <register_tm_clones+0x38>
    1110:	ff e0                	jmp    *%rax
    1112:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
    1118:	c3                   	ret    
    1119:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)

0000000000001120 <__do_global_dtors_aux>:
    1120:	f3 0f 1e fa          	endbr64 
    1124:	80 3d e5 2e 00 00 00 	cmpb   $0x0,0x2ee5(%rip)        # 4010 <__TMC_END__>
    112b:	75 2b                	jne    1158 <__do_global_dtors_aux+0x38>
    112d:	55                   	push   %rbp
    112e:	48 83 3d c2 2e 00 00 	cmpq   $0x0,0x2ec2(%rip)        # 3ff8 <__cxa_finalize@GLIBC_2.2.5>
    1135:	00 
    1136:	48 89 e5             	mov    %rsp,%rbp
    1139:	74 0c                	je     1147 <__do_global_dtors_aux+0x27>
    113b:	48 8b 3d c6 2e 00 00 	mov    0x2ec6(%rip),%rdi        # 4008 <__dso_handle>
    1142:	e8 09 ff ff ff       	call   1050 <__cxa_finalize@plt>
    1147:	e8 64 ff ff ff       	call   10b0 <deregister_tm_clones>
    114c:	c6 05 bd 2e 00 00 01 	movb   $0x1,0x2ebd(%rip)        # 4010 <__TMC_END__>
    1153:	5d                   	pop    %rbp
    1154:	c3                   	ret    
    1155:	0f 1f 00             	nopl   (%rax)
    1158:	c3                   	ret    
    1159:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)

0000000000001160 <frame_dummy>:
    1160:	f3 0f 1e fa          	endbr64 
    1164:	e9 77 ff ff ff       	jmp    10e0 <register_tm_clones>

0000000000001169 <Sum>:
int flag = 0;
//int flag = 1;
//int flag = -1;

int Sum(int s, int e)
{
    1169:	f3 0f 1e fa          	endbr64 
    116d:	55                   	push   %rbp
    116e:	48 89 e5             	mov    %rsp,%rbp
    1171:	89 7d ec             	mov    %edi,-0x14(%rbp)
    1174:	89 75 e8             	mov    %esi,-0x18(%rbp)
    int result = 0;
    1177:	c7 45 f8 00 00 00 00 	movl   $0x0,-0x8(%rbp)
    for(int i = s; i <= e; i++)
    117e:	8b 45 ec             	mov    -0x14(%rbp),%eax
    1181:	89 45 fc             	mov    %eax,-0x4(%rbp)
    1184:	eb 0a                	jmp    1190 <Sum+0x27>
    {
        result += i;
    1186:	8b 45 fc             	mov    -0x4(%rbp),%eax
    1189:	01 45 f8             	add    %eax,-0x8(%rbp)
    for(int i = s; i <= e; i++)
    118c:	83 45 fc 01          	addl   $0x1,-0x4(%rbp)
    1190:	8b 45 fc             	mov    -0x4(%rbp),%eax
    1193:	3b 45 e8             	cmp    -0x18(%rbp),%eax
    1196:	7e ee                	jle    1186 <Sum+0x1d>
    }

    return result*flag;
    1198:	8b 05 76 2e 00 00    	mov    0x2e76(%rip),%eax        # 4014 <flag>
    119e:	0f af 45 f8          	imul   -0x8(%rbp),%eax
}
    11a2:	5d                   	pop    %rbp
    11a3:	c3                   	ret    

00000000000011a4 <main>:

int main()
{
    11a4:	f3 0f 1e fa          	endbr64 
    11a8:	55                   	push   %rbp
    11a9:	48 89 e5             	mov    %rsp,%rbp
    11ac:	48 83 ec 10          	sub    $0x10,%rsp
    int start = 1;
    11b0:	c7 45 f4 01 00 00 00 	movl   $0x1,-0xc(%rbp)
    int end = 100;
    11b7:	c7 45 f8 64 00 00 00 	movl   $0x64,-0x8(%rbp)
    printf("I will begin\n");
    11be:	48 8d 3d 43 0e 00 00 	lea    0xe43(%rip),%rdi        # 2008 <_IO_stdin_used+0x8>
    11c5:	e8 96 fe ff ff       	call   1060 <puts@plt>
    int n = Sum(start, end);
    11ca:	8b 55 f8             	mov    -0x8(%rbp),%edx
    11cd:	8b 45 f4             	mov    -0xc(%rbp),%eax
    11d0:	89 d6                	mov    %edx,%esi
    11d2:	89 c7                	mov    %eax,%edi
    11d4:	e8 90 ff ff ff       	call   1169 <Sum>
    11d9:	89 45 fc             	mov    %eax,-0x4(%rbp)
    printf("running done, result is: [%d-%d]=%d\n", start, end, n);
    11dc:	8b 4d fc             	mov    -0x4(%rbp),%ecx
    11df:	8b 55 f8             	mov    -0x8(%rbp),%edx
    11e2:	8b 45 f4             	mov    -0xc(%rbp),%eax
    11e5:	89 c6                	mov    %eax,%esi
    11e7:	48 8d 3d 2a 0e 00 00 	lea    0xe2a(%rip),%rdi        # 2018 <_IO_stdin_used+0x18>
    11ee:	b8 00 00 00 00       	mov    $0x0,%eax
    11f3:	e8 78 fe ff ff       	call   1070 <printf@plt>
    printf("running done, result is: [%d-%d]=%d\n", start, end, n);
    11f8:	8b 4d fc             	mov    -0x4(%rbp),%ecx
    11fb:	8b 55 f8             	mov    -0x8(%rbp),%edx
    11fe:	8b 45 f4             	mov    -0xc(%rbp),%eax
    1201:	89 c6                	mov    %eax,%esi
    1203:	48 8d 3d 0e 0e 00 00 	lea    0xe0e(%rip),%rdi        # 2018 <_IO_stdin_used+0x18>
    120a:	b8 00 00 00 00       	mov    $0x0,%eax
    120f:	e8 5c fe ff ff       	call   1070 <printf@plt>
    printf("running done, result is: [%d-%d]=%d\n", start, end, n);
    1214:	8b 4d fc             	mov    -0x4(%rbp),%ecx
    1217:	8b 55 f8             	mov    -0x8(%rbp),%edx
    121a:	8b 45 f4             	mov    -0xc(%rbp),%eax
    121d:	89 c6                	mov    %eax,%esi
    121f:	48 8d 3d f2 0d 00 00 	lea    0xdf2(%rip),%rdi        # 2018 <_IO_stdin_used+0x18>
    1226:	b8 00 00 00 00       	mov    $0x0,%eax
    122b:	e8 40 fe ff ff       	call   1070 <printf@plt>
    printf("running done, result is: [%d-%d]=%d\n", start, end, n);
    1230:	8b 4d fc             	mov    -0x4(%rbp),%ecx
    1233:	8b 55 f8             	mov    -0x8(%rbp),%edx
    1236:	8b 45 f4             	mov    -0xc(%rbp),%eax
    1239:	89 c6                	mov    %eax,%esi
    123b:	48 8d 3d d6 0d 00 00 	lea    0xdd6(%rip),%rdi        # 2018 <_IO_stdin_used+0x18>
    1242:	b8 00 00 00 00       	mov    $0x0,%eax
    1247:	e8 24 fe ff ff       	call   1070 <printf@plt>
    printf("running done, result is: [%d-%d]=%d\n", start, end, n);
    124c:	8b 4d fc             	mov    -0x4(%rbp),%ecx
    124f:	8b 55 f8             	mov    -0x8(%rbp),%edx
    1252:	8b 45 f4             	mov    -0xc(%rbp),%eax
    1255:	89 c6                	mov    %eax,%esi
    1257:	48 8d 3d ba 0d 00 00 	lea    0xdba(%rip),%rdi        # 2018 <_IO_stdin_used+0x18>
    125e:	b8 00 00 00 00       	mov    $0x0,%eax
    1263:	e8 08 fe ff ff       	call   1070 <printf@plt>
    printf("running done, result is: [%d-%d]=%d\n", start, end, n);
    1268:	8b 4d fc             	mov    -0x4(%rbp),%ecx
    126b:	8b 55 f8             	mov    -0x8(%rbp),%edx
    126e:	8b 45 f4             	mov    -0xc(%rbp),%eax
    1271:	89 c6                	mov    %eax,%esi
    1273:	48 8d 3d 9e 0d 00 00 	lea    0xd9e(%rip),%rdi        # 2018 <_IO_stdin_used+0x18>
    127a:	b8 00 00 00 00       	mov    $0x0,%eax
    127f:	e8 ec fd ff ff       	call   1070 <printf@plt>
    printf("running done, result is: [%d-%d]=%d\n", start, end, n);
    1284:	8b 4d fc             	mov    -0x4(%rbp),%ecx
    1287:	8b 55 f8             	mov    -0x8(%rbp),%edx
    128a:	8b 45 f4             	mov    -0xc(%rbp),%eax
    128d:	89 c6                	mov    %eax,%esi
    128f:	48 8d 3d 82 0d 00 00 	lea    0xd82(%rip),%rdi        # 2018 <_IO_stdin_used+0x18>
    1296:	b8 00 00 00 00       	mov    $0x0,%eax
    129b:	e8 d0 fd ff ff       	call   1070 <printf@plt>
    printf("running done, result is: [%d-%d]=%d\n", start, end, n);
    12a0:	8b 4d fc             	mov    -0x4(%rbp),%ecx
    12a3:	8b 55 f8             	mov    -0x8(%rbp),%edx
    12a6:	8b 45 f4             	mov    -0xc(%rbp),%eax
    12a9:	89 c6                	mov    %eax,%esi
    12ab:	48 8d 3d 66 0d 00 00 	lea    0xd66(%rip),%rdi        # 2018 <_IO_stdin_used+0x18>
    12b2:	b8 00 00 00 00       	mov    $0x0,%eax
    12b7:	e8 b4 fd ff ff       	call   1070 <printf@plt>
    printf("running done, result is: [%d-%d]=%d\n", start, end, n);
    12bc:	8b 4d fc             	mov    -0x4(%rbp),%ecx
    12bf:	8b 55 f8             	mov    -0x8(%rbp),%edx
    12c2:	8b 45 f4             	mov    -0xc(%rbp),%eax
    12c5:	89 c6                	mov    %eax,%esi
    12c7:	48 8d 3d 4a 0d 00 00 	lea    0xd4a(%rip),%rdi        # 2018 <_IO_stdin_used+0x18>
    12ce:	b8 00 00 00 00       	mov    $0x0,%eax
    12d3:	e8 98 fd ff ff       	call   1070 <printf@plt>
    printf("running done, result is: [%d-%d]=%d\n", start, end, n);
    12d8:	8b 4d fc             	mov    -0x4(%rbp),%ecx
    12db:	8b 55 f8             	mov    -0x8(%rbp),%edx
    12de:	8b 45 f4             	mov    -0xc(%rbp),%eax
    12e1:	89 c6                	mov    %eax,%esi
    12e3:	48 8d 3d 2e 0d 00 00 	lea    0xd2e(%rip),%rdi        # 2018 <_IO_stdin_used+0x18>
    12ea:	b8 00 00 00 00       	mov    $0x0,%eax
    12ef:	e8 7c fd ff ff       	call   1070 <printf@plt>
    return 0;
    12f4:	b8 00 00 00 00       	mov    $0x0,%eax
}
    12f9:	c9                   	leave  
    12fa:	c3                   	ret    

Disassembly of section .fini:

00000000000012fc <_fini>:
    12fc:	f3 0f 1e fa          	endbr64 
    1300:	48 83 ec 08          	sub    $0x8,%rsp
    1304:	48 83 c4 08          	add    $0x8,%rsp
    1308:	c3                   	ret    
